package com.itcast.mallapplet.mapper;

import com.itcast.applet.entity.RiderEvaluate;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ShopEvaluateMapper {

    //新增商品评价
    @Insert("insert into shop_evaluate(shop_id, evaluate, create_time, user_id) values (#{shopId},#{evaluate},#{createTime},#{userId})")
    void shopEvaluateAdd(RiderEvaluate riderEvaluate);

    @Select("select * from shop_evaluate where shop_id = #{shopId}")
    int getByStatus(Long shopId);
}
